import { Middleware } from "koa";
import { logger } from "../log";

export function reqLogger(): Middleware {
  return async (ctx, next) => {
    await next();
    logger.info(`${ctx.method} ${ctx.path} ${ctx.response.status}`);
  };
}
